home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1989 February
/
Ahoy_Magazine_89-02_1989_Double_L.d64
/
Word Order
(
.txt
)
< prev
Wrap
Commodore BASIC
|
2022-10-26
|
434b
|
14 lines
0 print"[147]"tab(14)"word order"
1 rem ==================================
2 rem commodares problem #58-4 :
3 rem word order
4 rem solution by
5 rem carlos centeno
6 rem ==================================
10 input "enter 2 words";a$(1),a$(2): print
20 for x=1 to 2: z=65
30 for y=1 to len(a$(x))
40 if mid$(a$(x),y,1)=chr$(z) then b$(x)=b$(x)+mid$(a$(x),y,1)
50 next y: if len(b$(x))<>len(a$(x)) then z=z+1: goto 30
60 next x: print a$((b$(1)<b$(2))+2)" is first."